#include<reg52.h>
#define uint unsigned int


void delay(uint xms)
{
		uint i, j;
		for (i = xms; i > 0; i--)
				for (j = 122; j > 0; j--);
}

void main(void)
{
		int i = 0;
		while (1)
		{
				P1 = 0xfe;
				for (i = 0; i < 8; i++)
				{
						delay(1000);
						P1 <<= 1;
						P1 |= 1;
				}
		}
}